package com.stnet.service.enterprice.chinamobile;

import java.util.List;

import com.modules.commons.Pager;
import com.stnet.bases.BaseManagerDaoImpl;
import com.stnet.entity.Saleorder;


/**
 * @author Messcat
 * @version 1.1
 *
 */
public class SaleorderManagerDaoImpl extends BaseManagerDaoImpl implements SaleorderManagerDao {

	public SaleorderManagerDaoImpl() {
	}

	public void addSaleorder(Saleorder saleorder) {
		
		saleorderDao.save(saleorder);
	}

	public void deleteSaleorder(Long id) {
		saleorderDao.delete(id);
	}

	public Pager findSaleorder(int pageSize, int pageNo, String statu) {
		Pager pager = saleorderDao.getObjectListByClass(pageSize, pageNo, Saleorder.class, statu);
		return pager;
	}

	public Saleorder getSaleorder(Long id) {
		return saleorderDao.get(id);
	}

	public void updateSaleorder(Saleorder saleorder) {
		saleorderDao.update(saleorder);
	}
    public List findSaleorderByAgent(Long agent){
    	return saleorderDao.findSaleorderByAgent(agent);
    }
    
    public Pager getListByAgent(int pageSize, int pageNo, Long agent){
    	return this.saleorderDao.getListByAgent(pageSize, pageNo, agent);
    }

}